using System;
using System.Collections.Generic;
using System.Text;

namespace Xyne.Network
{
    /// <summary>
    /// Network data for ending the game.
    /// </summary>
    public class EndGameData : NetworkData
    {
        public const String ReasonDied = "died";
        public const String ReasonWon = "won";
        public const String ReasonQuit = "quit";

        private String reason;

        public String Reason
        {
            get { return reason; }
        }

        public EndGameData(String reason)
        {
            this.reason = reason;
            DataType = NetworkDataType.End;
        }

        public override NetworkData Create(String serializedData) { return new EndGameData(serializedData); }
        public override String Serialize() { return reason; }
    }
}
